//
//  ReferenceView.swift
//  swiftStudy
//
//  Created by Zhang on 2021/3/17.
//

import SwiftUI

struct ReferenceView: View {
    var body: some View {
        ScrollView(.vertical){
            
            VStack(alignment:.leading, spacing: 5){
                Section(header: SectionHeaderView(title:"参考文档")){
                    CommonTextView(content: "《Swift 4从零到精通ios开发》")
                    
                }
                
                Section(header: SectionHeaderView(title:"开源项目")){
                    
                    Text("    "+"https://github.com/varabeis/SwiftUI")
                        .underline(color: .gray)
                        .font(.system(size: 16,design:.serif))
                        .padding(10)
                        .lineSpacing(10)
                        .font(.system(size: 18))
                        .onTapGesture {
                            print("点击事件")
                        }
                    
                    Text("    "+"https://github.com/Jinxiansen/SwiftUI")
                        .underline(color: .gray)
                        .font(.system(size: 16,design:.serif))
                        .padding(10)
                        .lineSpacing(10)
                        .font(.system(size: 18))
                        .onTapGesture {
                            print("点击事件")
                        }
                }
            }
        }
        //设置VStack,横向填充屏幕
        .frame(minWidth: 0,
               maxWidth: .infinity,
               minHeight: 0,
               maxHeight: .infinity,
               alignment: .topLeading
        )
    }
}

struct ReferenceView_Previews: PreviewProvider {
    static var previews: some View {
        ReferenceView()
    }
}
